// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ConnectionString.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the <seealso cref="Hisaab.Windows.Client.Model.ConnectionString" /> type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Client.Model
{
    /// <summary>
    /// Defines the <seealso cref="ConnectionString"/> type.
    /// </summary>
    public class ConnectionString : ModelBase
    {
        /// <summary>
        /// Member variable _server
        /// </summary>
        private string _server;

        /// <summary>
        /// Member variable _database
        /// </summary>
        private string _database;

        /// <summary>
        /// Member variable _useIntegratedAuthentication
        /// </summary>
        private bool _useIntegratedAuthentication;

        /// <summary>
        /// Member variable _userName
        /// </summary>
        private string _userName;

        /// <summary>
        /// Member variable _password
        /// </summary>
        private string _password;

        /// <summary>
        /// Gets or sets the server.
        /// </summary>
        /// <value>
        /// The database server.
        /// </value>
        public string Server
        {
            get
            {
                return _server;
            }

            set
            {
                if (_server != value)
                {
                    _server = value;
                    RaisePropertyChangedEvent("Server");
                }
            }
        }

        /// <summary>
        /// Gets or sets the database.
        /// </summary>
        /// <value>
        /// The database.
        /// </value>
        public string Database
        {
            get
            {
                return _database;
            }

            set
            {
                if (_database != value)
                {
                    _database = value;
                    RaisePropertyChangedEvent("Database");
                }
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether [use integrated authentication].
        /// </summary>
        /// <value>
        /// <c>true</c> if [use integrated authentication]; otherwise, <c>false</c>.
        /// </value>
        public bool UseIntegratedAuthentication
        {
            get
            {
                return _useIntegratedAuthentication;
            }

            set
            {
                if (_useIntegratedAuthentication != value)
                {
                    _useIntegratedAuthentication = value;
                    RaisePropertyChangedEvent("UseIntegratedAuthentication");
                }
            }
        }

        /// <summary>
        /// Gets or sets the name of the user.
        /// </summary>
        /// <value>
        /// The name of the user.
        /// </value>
        public string UserName
        {
            get
            {
                return _userName;
            }

            set
            {
                if (_userName != value)
                {
                    _userName = value;
                    RaisePropertyChangedEvent("UserName");
                }
            }
        }

        /// <summary>
        /// Gets or sets the password.
        /// </summary>
        /// <value>
        /// The password.
        /// </value>
        public string Password
        {
            get
            {
                return _password;
            }

            set
            {
                if (_password != value)
                {
                    _password = value;
                    RaisePropertyChangedEvent("Password");
                }
            }
        }
    }
}